// Decompiled by GOOSIN CO,LTD Copyright 2010 Pavel Kouznetsov.
// home page: http://www.Goosin.net
// Decompiler options: packimports(3) fieldsfirst ansi space 
// Source File Name:   update_dragImg.java

package include.ajax;

import include.nseer_db.nseer_db_backup;
import java.io.IOException;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.http.*;
import javax.servlet.jsp.JspFactory;

public class update_dragImg extends HttpServlet
{

	ServletContext application;
	HttpSession session;
	nseer_db_backup erp_db;

	public update_dragImg()
	{
		erp_db = null;
	}

	public void doPost(HttpServletRequest request, HttpServletResponse response)
		throws IOException, ServletException
	{
		HttpSession dbSession = request.getSession();
		JspFactory _jspxFactory = JspFactory.getDefaultFactory();
		javax.servlet.jsp.PageContext pageContext = _jspxFactory.getPageContext(this, request, response, "", true, 8192, true);
		ServletContext dbApplication = dbSession.getServletContext();
		try
		{
			java.io.PrintWriter out = response.getWriter();
			nseer_db_backup db = new nseer_db_backup(dbApplication);
			if (db.conn((String)dbSession.getAttribute("unit_db_name")))
			{
				String id = request.getParameter("id");
				String human_ID = (String)dbSession.getAttribute("human_IDD");
				String drag_img_left1 = request.getParameter("drag_img_left");
				String drag_img_top1 = request.getParameter("drag_img_top");
				String sql = (new StringBuilder("update drag_img set drag_img_top='")).append(drag_img_top1).append("',drag_img_left='").append(drag_img_left1).append("' where img_id='").append(id).append("' and human_ID='").append(human_ID).append("'").toString();
				db.executeUpdate(sql);
				db.close();
			} else
			{
				response.sendRedirect("error_conn.htm");
			}
		}
		catch (Exception ex)
		{
			ex.printStackTrace();
		}
	}
}
